[3.9] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (GH-99613...
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 22 Aug 2023 18:25:15 +0000 (21:25 +0300)
committerAndrej Shadura <andrewsh@debian.org>
Tue, 20 Jan 2026 10:45:10 +0000 (11:45 +0100)
commit2e5e6e28fb7172981e261004defcfe560fc3eb14
treee774f712171b0a4622d45099fbb1ba721247ece8
parent405f3ab3afb74b08c0a76c60f50d6ca425e4eed4
[3.9] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (GH-99613) (GH-107224) (#107231)

Previously *consumed was not set in this case.
(cherry picked from commit f08e52ccb027f6f703302b8c1a82db9fd3934270).
(cherry picked from commit b8b3e6afc0a48c3cbb7c36d2f73e332edcd6058c)

Origin: upstream, https://github.com/python/cpython/commit/4a793281956db0e4a1ca5fdc5f3a0e91f331a75d

Gbp-Pq: Name CVE-2025-4516-5.patch
Lib/test/test_unicode.py
Misc/NEWS.d/next/C API/2022-11-20-09-52-50.gh-issue-99612.eBHksg.rst [new file with mode: 0644]
Modules/_testcapimodule.c
Objects/unicodeobject.c